從USB裝置上安裝及啟動Windows XP

穩萊

從USB裝置上安裝及啟動Windows XP
原文
http://www.ngine.de/index.jsp?pageid=4176
步驟:

摘要:

先把原版Windows XP光碟轉存成映像檔,再使用修改映像檔的軟件抽出數個檔案,並修改這些檔案,再把修改後的檔案放回映像檔。把修改過的映像檔燒錄成光碟,就可以把Windows安裝在USB裝置。

以下會告訴大家一些易犯的錯誤,希望可以幫助大家不會浪費時間。

1) 你的電腦是否支援USB啟動?
一般來說,只要主機板的BIOS有支援USB啟動的選項,就能支援USB啟動。如果沒有此選項,可嘗試更新BIOS。如果你不確定你的電腦是否支援USB啟動,亦不妨試試看;-)

2) 使用支援USB啟動的USB裝置
把USB裝置連接你的電腦(請不要通過Hub連接)。接著關閉你的電腦,拔除所有接拔在主機板的硬碟裝置,插入原版Windows XP光碟。開始安裝程序,執行到選擇安裝位置的步驟。如果通過分割選項的步驟,即表示你的裝置能成功運作。若否(),你會收到”Windows找不到硬體”。通常這不是大問題。你只需要正確的格式化你的裝置。去下載HP tool,用它來完整地格式化你的硬碟。NTFS格式亦能正常運作。完成後,Windows XP installer就能識別出裝置。(事實上我沒有嘗試FAT32格式)

3) 把原版Windows光碟轉存成ISO檔
非常簡單。執行WinISO,選擇Actions -> Make ISO from CDROM,儲存成映像光碟。

4) 抽出需要修改的檔案
轉存成映像檔後,重開WinISO。打開ISO檔 File -> Open

找出I386資料夾,並選擇以下檔案

• TXTSETUP.SIF
• DOSNET.INF
• USB.IN_
• USBPORT.IN_
• USBSTOR.IN_

選擇Actions -> Extract,把選擇的檔案暫存任一資料夾

5) 打開 .IN_ 的檔案
使用Cab SDK來頡取 .IN_。.IN_ 檔的內容是相同於 .inf 檔。若不會使用Cab SDK,參考此指令:"cabarc x USBSTOR.IN_"。結束程式並儲存檔案。

* usb.inf
* usbport.inf
* usbstor.inf

刪除 .IN_的檔案

6) 編輯檔案
這裡是重點。我會詳細解釋接下來的步驟。打開記事本。

6-A) TXTSETUP.SIF
這個檔案是用來載入Windows XP CD installer最開始的安裝步驟。我們可以通過修過這個檔案以達到在Windows安裝時能辨識到USB裝置-在執行安裝時作預設輸入裝置-我們就是要修改其對儲存裝置的支援(儲存裝置是用來預先載入安裝程式)

第一步,移動以下的項來,由[InputDevicesSupport.Load] (粗體項目) 移到[BootBusExtenders.Load],如下

[BootBusExtenders.Load]
pci = pci.sys
acpi = acpi.sys
isapnp = isapnp.sys
acpiec = acpiec.sys
ohci1394 = ohci1394.sys
usbehci = usbehci.sys
usbohci = usbohci.sys
usbuhci = usbuhci.sys
usbhub = usbhub.sys
usbstor = usbstor.sys


[InputDevicesSupport.Load]
usbehci = usbehci.sys
usbohci = usbohci.sys
usbuhci = usbuhci.sys
usbhub = usbhub.sys
usbccgp = usbccgp.sys
hidusb = hidusb.sys
serial = serial.sys
serenum = serenum.sys
usbstor = usbstor.sys

跟先前的修改一樣,由[InputDevicesSupport] (粗體項目) 移動到[BootBusExtenders]

[BootBusExtenders]
pci = "PCI-Bustreiber",files.pci,pci
acpi = "ACPI Plug & Play-Bustreiber",files.acpi,acpi
isapnp = "ISA Plug & Play-Bustreiber",files.isapnp,isapnp
acpiec = "Integrierter ACPI-Controllertreiber",files.none,acpiec
ohci1394 = "IEEE-1394-Bus-OHCI-konformer Anschlusstreiber",files.ohci1394,ohci1394
usbehci = "Erweiterter Hostcontroller",files.usbehci,usbehci
usbohci = "Open Hostcontroller",files.usbohci,usbohci
usbuhci = "Universeller Hostcontroller",files.usbuhci,usbuhci
usbhub = "Standard-USB-Hubtreiber",files.usbhub,usbhub
usbstor = "USB-Speicherklassentreiber",files.usbstor,usbstor


[InputDevicesSupport]
usbehci = "Erweiterter Hostcontroller",files.usbehci,usbehci
usbohci = "Open Hostcontroller",files.usbohci,usbohci
usbuhci = "Universeller Hostcontroller",files.usbuhci,usbuhci
usbhub = "Standard-USB-Hubtreiber",files.usbhub,usbhub
hidusb = "HID-Parser",files.hidusb,hidusb
serial = "Treiber f?r seriellen Anschluss",files.none,serial
serenum = "Enumerator f?r seriellen Anschluss",files.none,serenum
usbstor = "USB-Speicherklassentreiber",files.usbstor,usbstor
usbccgp = "USB Generic Parent Driver",files.usbccgp,usbccgp

第二步,我們需要寫入幾個指令入登錄檔。非常簡單,只需輸入AddReg = usbboot.inf,usbservices於[HiveInfs.Fresh] 及usbboot.inf = 1,,,,,,_x,3,,3於[SourceDisksFiles]:
[HiveInfs.Fresh]
AddReg = hivedef.inf,AddReg
AddReg = hivesys.inf,AddReg
AddReg = hivesft.inf,AddReg
AddReg = hivecls.inf,AddReg
AddReg = hiveusd.inf,AddReg
AddReg = dmreg.inf,DM.AddReg
AddReg = usbboot.inf,usbservices

[SourceDisksFiles]
usbboot.inf = 1,,,,,,_x,3,,3
bootvid.dll = 1,,,,,,3_,2,0,0,,1,2
kdcom.dll = 1,,,,,,3_,2,0,0,,1,2

最後,儲存及關閉TXTSETUP.SIF。

再打開DOSNET.INF,在第二個[Files]區插入d1,usbboot.inf (若使用非原版Windows XP光碟可能沒有第二個[Files]區)
[Files]
d1,usbboot.inf
d1,_default.pif
d1,12520437.cpx
d1,12520850.cpx
....
6-C) usb.inf
修改在[StandardHub.AddService]和[CommonClassParent.AddService]區粗體的地方

[StandardHub.AddService]
DisplayName = %StandardHub.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbhub.sys
LoadOrderGroup = Boot Bus Extender

[CommonClassParent.AddService]
DisplayName = %GenericParent.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbccgp.sys
LoadOrderGroup = Boot Bus Extender

6-D) usbport.inf
修改在[EHCI.AddService], [OHCI.AddService] , [UHCI.AddService]和[ROOTHUB.AddService]區粗體的地方

[EHCI.AddService]
DisplayName = %EHCIMP.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbehci.sys
LoadOrderGroup = Boot Bus Extender

[OHCI.AddService]
DisplayName = %OHCIMP.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbohci.sys
LoadOrderGroup = Boot Bus Extender

[UHCI.AddService]
DisplayName = %UHCIMP.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbuhci.sys
LoadOrderGroup = Boot Bus Extender

[ROOTHUB.AddService]
DisplayName = %ROOTHUB.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbhub.sys
LoadOrderGroup = Boot Bus Extender

6-E) usbstor.inf
修改或新增在[USBSTOR.AddService]區粗體的地方

[USBSTOR.AddService]
DisplayName = %USBSTOR.SvcDesc%
ServiceType = 1
StartType = 0
Tag = 3
ErrorControl = 1
ServiceBinary = %12%\USBSTOR.SYS
LoadOrderGroup = Boot Bus Extender

6-F) 在資料夾內新增一叫USBBOOT.INF的檔案,並複制以下內容:

[usbservices]
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","DisplayName",0x00000000,"USB Mass Storage Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","ImagePath",0x00020000,"system32\DRIVERS\USBSTOR.SYS"
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR","Type",0x00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","DisplayName",0x00000000,"USB 2.0 Enhanced Host Controller Miniport Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","ImagePath",0x00020000,"system32\DRIVERS\usbehci.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Type",0x00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","DisplayName",0x00000000,"USB2 Enabled Hub"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","ImagePath",0x00020000,"system32\DRIVERS\usbhub.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Type",0x00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","DisplayName",0x00000000,"Microsoft USB Universal Host Controller Miniport Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","ImagePath",0x00020000,"system32\DRIVERS\usbuhci.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci","Type",0x00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","DisplayName",0x00000000,"Microsoft USB Open Host Controller Miniport Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","ImagePath",0x00020000,"system32\DRIVERS\usbohci.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Type",0x00010001,1

7) 把.inf檔的副檔名改回 .IN_
即使你沒有刪除本身的 .IN_檔亦無妨,只需覆蓋他們便可。打開DOS shell,執行以下指示:

cabarc n USB.IN_ usb.inf
cabarc n USBPORT.IN_ usbport.inf
cabarc n USBSTOR.IN_ usbstor.inf

以上3個 . IN_檔就會出現。

恭喜!所有修改完成。

8) 插入已修改的檔案回ISO檔
使用WinISO打開Windows映像檔。從映像檔中刪除I386資料夾內以下的檔案並儲存:
• DOSNET.INF
• TXTSETUP.SIF
• USB.IN_
• USBPORT.IN_
• USBSTOR.IN_

確認修改過的檔案已放入Windows映像檔內,重啟Windows映像檔。在I386資料夾內新增以下已修改的檔案
• USBBOOT.INF
• DOSNET.INF
• TXTSETUP.SIF
• USB.IN_
• USBPORT.IN_
• USBSTOR.IN_

儲存Windows映像檔。

9) 把修改後的Windows映像檔燒錄成光碟
使用任何燒錄程式。我個人使用免費又簡易操作的Burnatonce

10) 安裝Windows XP
關閉電腦。拔除所有硬碟裝置(令安裝程式無法找尋到硬碟裝置以免擾亂Master Boot記錄)。沒有安裝硬碟會使有些電腦出現啟動問題,檢查BIOS,並移除使用HDD作第一啟動並設定USB儲存裝置作第一啟動裝置,光驅為第二啟動裝置。

連接USB儲存裝置,勿通過Hubs連接

此時Windows應該能順利安裝。

在安裝時將會出現:
.安裝中,會出現提示,會出現USB裝置"not certified"(未認證)-這是正常。只需按"yes"便可。
.完成安裝後,在系統第一次啟動時會出現pagefile不存在的警告。只需忽略便可,Windows會繼續運作。有些人找尋解決的辦法,但大家可以忽略之。

經過Windows完整的啟動及運作後,可以關閉電腦及連接之前拔除的裝置。

以下為測試成功的硬體裝置-若各下亦能成功完成,懇請把你的資訊告訴我email me,而我亦會把你的裝置加到以下的清單列:

• Dell Latitude D810, Freecom FHD-3 80GB USB2 HDD, NTFS formatted using HP tool
• Dell Latitude D810, Western Digital 2206A 80GB USB2 HDD, NTFS formatted using HP tool

若有任何疑問,請瀏覽forum一起討論。

have a lot of fun!

Emanuel Schleussinger
http://www.ngine.de   Mar 2006

另一個說明點 http://www.vipcn.com/InfoView/Article_96656.html

http://www.computerdiy.com.tw/modules/news/article.php?storyid=1922

 

 給當前日誌評分:
Loading Vote
正在讀取評分資料...


文章來自: Tank部落格
引用通告: 查看所有引用 | 我要引用此文章
Tags: USB Windows XP
相關日誌:

評論: 0 | 引用: 0 | 查看次數: -
發表評論
暱 稱:
密 碼: 遊客發言不需要密碼.
內 容:
驗證碼: 驗證碼
選 項:
雖然發表評論不用註冊,但是為了保護您的發言權,建議您註冊帳號.